<script>
export default{
    data(){
        return {
            count:0
        }
    },
    methods:{
        increase(){
           this.count++
        },
        decrease(){
           this.count--
        }
    }
}
</script>
<template>
    <div>
       <p>{{ count }}</p>
       <button @click="increase">加1</button>
       <button @click="decrease">减1</button>
    </div>
</template>
<style scoped>

</style>